import 'package:flutter/foundation.dart';
import 'package:flutter_project/common/utils/locations/locations_utils.dart';
import 'package:flutter/cupertino.dart';

class ASLocalizationsDelegate extends LocalizationsDelegate<LocationsUtils> {
 static ASLocalizationsDelegate delegate = ASLocalizationsDelegate();

  @override
  bool isSupported(Locale locale) {
    return ['zh', 'en'].contains(locale.languageCode);
  }

  @override
  Future<LocationsUtils> load(Locale locale) {
    return SynchronousFuture(LocationsUtils(locale: locale));
  }

  @override
  bool shouldReload(covariant LocalizationsDelegate old) {
    return false;
  }
}
